<%@ Page Language="VB" AutoEventWireup="false" CodeFile="SQFunctionD.aspx.vb" Inherits="SQFunctionD" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">    
    <link href="ADStyles.css" rel="stylesheet" type="text/css" />
    <title><%=me.FormLabel %></title>
</head>

<script language="javascript" type="text/javascript">
function setToolbarAction(varAction)
{
    var oAction=document.getElementById("hidToolbarAction");
    oAction.value=varAction;

    document.form1.submit();

    return true;
}
    
function ShowViewWindow()
{
window.open('SQFunctionD.aspx?S=<%=me.ServerID %>&D=<%=me.DatabaseID %>&O=<%=me.ObjectID %>&R=<%=me.ObjectRev %>&F=1', 'Function', 'width=540,height=600,scrollbars=1,menubar=1,resizable=1;');
return true;  
}
  
function onLoad()
{
    var TopWindow=top.window.document;
       
    var DashTitle=TopWindow.getElementById('DashboardTitle');
    var DashMode=TopWindow.getElementById('DMode');
    var MyServer=TopWindow.getElementById('SID');
    
    if (DashTitle!=null) DashTitle.innerHTML='<%=me.FormLabel %>';
    if (DashMode!=null) DashMode.value='<%=me.EditMode %>';
    if (MyServer!=null) MyServer.value='<%=me.ServerID %>';
    
    //--Hide toolbar buttons?
    var q=window.location.search;
    var isprint=q.indexOf('&F=');
        
    if (isprint>0)
    {
        var tb1=document.getElementById('cmdBack');
        tb1.style.visibility = 'hidden';
        
        var tb2=document.getElementById('cmdView');
        tb2.style.visibility = 'hidden';
        
        var tb3=document.getElementById('cmdUpdate');
        tb3.style.visibility = 'hidden';
    }
}
</script>

<body onload="onLoad();">
    <form id="form1" runat="server">
    <div>
    <table>
    <tr class="wmObjectDetailDev_TH">
    <td valign="top" align="left" width="100%" class="wmObjectDetailDev_TH" style="padding-top: 5px; padding-left: 5px; height:38px; border: solid 1px grey; background-color: #C3C4C1;">
    <input type="hidden" id="hidSID" runat="server" />
    <input type="hidden" id="hidDID" runat="server" />
    <input type="hidden" id="hidOID" runat="server" />
    <input type="hidden" id="hidRID" runat="server" />
    <div style="position:absolute; top: 19px;">Last Modified on:</div> 
    <div style="position:absolute; top: 19px; left: 120px;" id="lblRev" runat="server">
    <select id="cmbRev" name="cmbRev" runat="server" onchange="setToolbarAction('refresh');" />
    </div>
    
    <div style="position:absolute; top: 19px; left: 350px;">
    <input 
        type="image" 
        src="images/tb_save.jpg" 
        title="Update description" 
        alt="Update description" 
        id="cmdUpdate" 
        name="cmdUpdate" 
        onclick="setToolbarAction('save');" 
        value="Update" />

    <input 
        type="image" 
        src="images/tb_back.jpg" 
        title="Return to list of functions" 
        alt="Return to list of functions" 
        id="cmdBack" 
        name="cmdBack" 
        onclick="setToolbarAction('back');" 
        value="Update" />
        
    <input 
        type="image" 
        src="images/tb_refresh.jpg"
        title="Refresh" 
        alt="Refresh" 
        id="cmdRefresh" 
        onclick="setToolbarAction('refresh');"/>
        
    <input 
        type="image" 
        src="images/tb_newwindow.jpg" 
        title="View in seperate window for printing" 
        alt="View in seperate window for printing" 
        id="cmdView" 
        name="cmdView" 
        onclick="ShowViewWindow();" />
    </div>
    
    </td>
    </tr>
    <tr>
    <td style="vertical-align:top; text-align: left;">
    <div id="lblDesc" style="width:500px; height:80px; margin-top: 10px; margin-bottom:5px; text-align:left; vertical-align:top" runat="server"><textarea name="txtDesc" id="txtDesc" runat="server" rows="3" cols="55"></textarea></div>
    </td>
    </tr>
    </table>
    <%Me.ShowFunctionDetail()%>
    </div>
    
    <input type="hidden" id="hidToolbarAction" runat="server" />
    </form>
</body>
</html>
